﻿<Page
    x:Class="HDK.Demo.Pages.AsyncVirtualizingCollectionPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:HDK.Demo.Pages"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <UserControl.Resources>
        <CollectionViewSource x:Name="itemsViewSource" Source="{Binding Data}" ItemsPath="Items" />


        <DataTemplate x:Key="FeedItemTemplate">
                <StackPanel VerticalAlignment="Bottom" Background="{StaticResource ListViewItemOverlayBackgroundBrush}" Width="250" Height="250">
                    <TextBlock Text="{Binding Id}" Foreground="{StaticResource ListViewItemOverlayTextBrush}" Style="{StaticResource TitleTextStyle}" Height="60"/>
                    <TextBlock Text="{Binding SmallAndFastData}" Foreground="{StaticResource ListViewItemOverlayTextBrush}" Style="{StaticResource TitleTextStyle}" Height="60" Margin="15,0,15,0"/>
                    <TextBlock Text="{Binding LargeAndFastData}" Foreground="{StaticResource ListViewItemOverlaySecondaryTextBrush}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap" Margin="15,0,15,10"/>
                    <Grid Background="{Binding SmallAndSlowData}">
                        <TextBlock Text="Small And Slow Data" />
                    </Grid>

                    <TextBlock Text="{Binding LargeAndSlowData}" TextWrapping="NoWrap" />
                </StackPanel>
        </DataTemplate>
    </UserControl.Resources>



        <Grid Background="{StaticResource ApplicationPageBackgroundBrush}">
        <StackPanel>
            <ContentControl x:Name="titleContent"  Margin="20,20,20,20" >
            </ContentControl>
            <GridView
                x:Name="itemGridView"
                
                SelectionMode="None"
                AutomationProperties.AutomationId="ItemsGridView"
                AutomationProperties.Name="Items"
            IncrementalLoadingThreshold="2"
            IncrementalLoadingTrigger="Edge"
             DataFetchSize="10"
                ItemsSource="{Binding Source={StaticResource itemsViewSource}}"
                ItemTemplate="{StaticResource FeedItemTemplate}"
            >
        </GridView>

    </StackPanel>
    </Grid>
</Page>